class Person():

    # __init__ 初始化函数
    def __init__(self, name: str, age: int):
        # 赋值即定义
        self.name = name
        self.age = age

    def print(self):
        print(self.name, self.age)


# 类的初始化
person = Person("张三", 23)

person.print()


# 继承
class Student(Person):
    # 占位符
    # pass

    # __init__ 初始化函数
    def __init__(self, name: str, age: int, gender: str):
        super(Student, self).__init__(name, age)
        # 赋值即定义

        # 属性私有化
        self.__gender = gender

    def print(self):
        print(self.name, self.age, self.__gender)


student = Student("李四", 23, "男")
student.print()
# print(student.__gender)
